<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;

        }

        li {
            float:left;
            list-style: none;
            width: 100px;
            text-align: center;
            float: left;
        }

        .row:after {
            content: "";
            display: block;
            clear: both;
        }

        a {
            display: block;
            color: #fff;
            text-decoration: none;
           

        }

        ul {
            line-height:50px;
            background: deeppink;
        } 
        a:hover{
            background: pink;
        }
    </style>
</head>

<body>
    <ul class="row">
        <li>
            <a href="#">手机</a>
        </li>
        <li>
            <a href="#">电脑</a>
        </li>
        <li>
            <a href="#">平板</a>
        </li>
    </ul>
</body>

</html>